/**
 * 2025/01/01 - 2025/12/31
 */
package com.snail.starter.iam.initializing;

import com.snail.starter.iam.initializing.properties.MenuYaml;
import com.snail.starter.iam.initializing.properties.ResourceYaml;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author zgadmin
 * @date 2025/8/27 10:50
 */
@Component
public class ApplicationInitializing implements InitializingBean {

    @Resource
    IMenuAdapter menuAdapter;

    @Resource
    IResourceAdapter resourceAdapter;

    @Resource
    MenuYaml menuYaml;

    @Resource
    ResourceYaml resourceYaml;

    @Override
    public void afterPropertiesSet() throws Exception {
        menuAdapter.init(menuYaml);
        resourceAdapter.init(resourceYaml);
    }

}